/*
 * @Description:
 * @Version: 0.0.1
 * @Autor: zhj1214
 * @Date: 2021-03-10 16:21:19
 * @LastEditors: zhj1214
 * @LastEditTime: 2021-03-11 14:18:25
 */
const program = require("commander");
const packageInfo = require("../../package.json");

program.version(packageInfo.version);

program
  .command("init") // fe init
  .description("初始化模板")
  .alias("i") // 简写
  .action(() => {
      require('../cmd/init')();
  });

program
  .command("add") // fe add
  .description("添加新模板")
  .alias("a") // 简写
  .action(() => {
      require('../cmd/add')();
  });

program
  .command("list") // fe list
  .description("查看模板列表")
  .alias("l") // 简写
  .action(() => {
      require('../cmd/list')();
  });

program
  .command("delete") // fe delete
  .description("删除模板")
  .alias("d") // 简写
  .action(() => {
      require('../cmd/delete')();
  });

program.parse(process.argv);

if (!program.args.length) {
  program.help();
}
